﻿using System;
using SortOf;

namespace Example2
{
    class Example2
    {
        public Example2()
        {
            CodeTijdMeting.setup();

            lock (this)
            {
                CodeTijdMeting.begin();


                int[] numbers = { 10, 89, 34, 32, 67, 67 };
                InsertionSort.Sort(numbers);
                Console.WriteLine(String.Join(" ", numbers));

                Surface.Surface[] surfaces = { 
                    new Surface.Surface(10.5, 5.5), 
                    new Surface.Surface(2.1, 3.7), 
                    new Surface.Surface(20.6, 10.3) 
                };

                InsertionSort.Sort(surfaces);
                CodeTijdMeting.stop();
                Console.WriteLine("Time: " + CodeTijdMeting.getResultNanoSecond() / 1000000000);
                Console.WriteLine("Begin: " + CodeTijdMeting.getStart());
                Console.WriteLine("End: " + CodeTijdMeting.getEnd());
                Console.WriteLine("Freq: " + CodeTijdMeting.getFrequency());
                CodeTijdMeting.reset();
                for (int i = 0; i < surfaces.Length; i++)
                {
                    Console.Write(surfaces[i].ToString() + " ");
                }
                Console.Write("\n");
            }
        }

        static void Main(string[] args)
        {
            Example2 example2 = new Example2();



        }
    }
}
